package com.river.boot.biz.model.form;

import java.io.Serial;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

import jakarta.validation.constraints.*;

/**
 * 规格选项表单对象
 *
 * @author JiangCheng Xiang
 * @since 2025-04-25 15:57
 */
@Getter
@Setter
@Schema(description = "规格选项表单对象")
public class ProductSpecOptionForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "规则选项ID")
    private Long id;

    private Long specId;

    @Schema(description = "选项名称(如:微辣)")
    @NotBlank(message = "选项名称(如:微辣)不能为空")
    @Size(max = 50, message = "选项名称(如:微辣)长度不能超过50个字符")
    private String name;

    @Schema(description = "价格调整")
    private BigDecimal priceAdjustment;

    @Schema(description = "选项图片")
    @Size(max = 255, message = "选项图片长度不能超过255个字符")
    private String image;

    private Integer sort;

}
